package mvc.unit;

import java.lang.reflect.Field;

import javax.servlet.http.HttpServletRequest;

import mvc.form.ActionForm;

//import com.sun.java.util.jar.pack.Package.Class.Field;

//import com.sun.java.util.jar.pack.Package.Class.Field;

   public class FullBean {
	public FullBean(){
		
	}
	public static ActionForm o(HttpServletRequest request ){
		ActionForm o=null;
		try {
			Class classA = Class.forName(request.getParameter("sign"));
			o = (ActionForm)classA.newInstance();
			Field [] fieldA = classA.getDeclaredFields();
			
			for (Field f :fieldA){
				f.setAccessible(true);
				f.set(o, request.getParameter(f.getName()));
				f.setAccessible(false);
				
			}
		}catch (Exception e){
			
		}
		
		return o;
	}
}
